﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;

namespace EasyTrader.Form
{
    public partial class SysCommonSetFrm : System.Windows.Forms.Form
    {
#region  member variables
        private int m_SysType = GlobalVar.SysTypeJisuWaveHogaSummit;
        public int SysType
        {
            get { return m_SysType; }
            set { m_SysType = value; }
        }

        int m_SysEndHour = 0;
        int m_SysEndMin = 0;
        int m_SysStartHour = 0;
        int m_SysStartMin = 0;

        bool m_AutoOrder = GlobalVar.AutoOrder;
        int m_OrderStartHour = GlobalVar.OrderStartHour;
        int m_OrderStartMin = GlobalVar.OrderStartMin;
        int m_OrderEndHour = GlobalVar.OrderEndHour;
        int m_OrderEndMin = GlobalVar.OrderEndMin;
        int m_OrderStartSignal = 1;
        int m_OrderEndSignal = 5;
        int m_PerOrderAmount = 1;


        bool m_EnableTotalProfitLiquid = false;
        bool m_EnableTotalLossLiquid = false;
        bool m_EnablePerProfitLiquid = false;
        bool m_EnablePerLossLiquid = false;
        double m_TotalProfitLiquidValue = 0.0;
        double m_TotalLossLiquidValue = 0.0;
        double m_PerProfitLiquidValue = 0.0;
        double m_PerLossLiquidValue = 0.0;


        private  double m_StepLiquidVal = 50;
        private  bool m_EnableTotalProfitStepLiquid = false;
        private int m_PerLiquidOrderAmount = 1;


        private  bool m_EnableProfitTrailStop = false;
        private  double m_MaxProfitLiquidVal = 25;
        private  double m_MinProfit = 50;

        int m_OrderTarget = GlobalVar.OrderTargetFuture;
        int m_FirstMaxOrderAmount = JisuWaveHogaSummitSysVar.FirstMaxOrderAmount;

#endregion
        public SysCommonSetFrm()
        {
            InitializeComponent();
            for (int i = 0; i < GlobalVar.SysNameArray.Length; i++)
                comboSystem.Items.Add(GlobalVar.SysNameArray[i]);
            comboSystem.SelectedIndex = m_SysType;
            comboFirstSig.SelectedIndex = 0;

            m_SysStartHour = comboSysStateStartHour.SelectedIndex = JisuWaveHogaSummitSysVar.SysStartHour;
            m_SysStartMin = comboSysStateStartMin.SelectedIndex = JisuWaveHogaSummitSysVar.SysStartMin;
            m_SysEndHour = comboSysStateEndHour.SelectedIndex = JisuWaveHogaSummitSysVar.SysEndHour;
            m_SysEndMin = comboSysStateEndMin.SelectedIndex = JisuWaveHogaSummitSysVar.SysEndMin;
            m_OrderStartHour = comboOrderStartHour.SelectedIndex = JisuWaveHogaSummitSysVar.OrderStartHour;
            m_OrderStartMin = comboOrderStartMin.SelectedIndex = JisuWaveHogaSummitSysVar.OrderStartMin;
            m_OrderEndHour = comboOrderEndHour.SelectedIndex = JisuWaveHogaSummitSysVar.OrderEndHour;
            m_OrderEndMin = comboOrderEndMin.SelectedIndex = JisuWaveHogaSummitSysVar.OrderEndMin;
            m_OrderStartSignal = comboOrderStartState.SelectedIndex = JisuWaveHogaSummitSysVar.SysStartState;
            m_OrderEndSignal = comboOrderEndState.SelectedIndex = JisuWaveHogaSummitSysVar.SysEndState;

            int selectedIndex = comboPerLoss.FindString(JisuWaveHogaSummitSysVar.PerLossLiquidValue.ToString());
            comboPerLoss.SelectedIndex = selectedIndex;
            m_PerLossLiquidValue = JisuWaveHogaSummitSysVar.PerLossLiquidValue;

            selectedIndex = comboPerProfit.FindString(JisuWaveHogaSummitSysVar.PerProfitLiquidValue.ToString());
            comboPerProfit.SelectedIndex = selectedIndex;
            m_PerProfitLiquidValue = JisuWaveHogaSummitSysVar.PerProfitLiquidValue;

            selectedIndex = comboTotalLoss.FindString(JisuWaveHogaSummitSysVar.TotalLossLiquidValue.ToString());
            comboTotalLoss.SelectedIndex = selectedIndex;
            m_TotalLossLiquidValue = JisuWaveHogaSummitSysVar.TotalLossLiquidValue;

            selectedIndex = comboTotalProfit.FindString(JisuWaveHogaSummitSysVar.TotalProfitLiquidValue.ToString());
            comboTotalProfit.SelectedIndex = selectedIndex;
            m_TotalProfitLiquidValue = JisuWaveHogaSummitSysVar.TotalProfitLiquidValue;


            if (JisuWaveHogaSummitSysVar.EnablePerLossLiquid == true)
            {
                cbPerLossLiquid.Checked = true;
            }
            else
            {
                cbPerLossLiquid.Checked = false;
            }

            m_EnablePerLossLiquid = JisuWaveHogaSummitSysVar.EnablePerLossLiquid;

            if (JisuWaveHogaSummitSysVar.EnablePerProfitLiquid == true)
            {
                cbPerProfitLiquid.Checked = true;
            }
            else
            {
                cbPerProfitLiquid.Checked = false;
            }

            m_EnablePerProfitLiquid = JisuWaveHogaSummitSysVar.EnablePerProfitLiquid;

            if (JisuWaveHogaSummitSysVar.EnableTotalLossLiquid == true)
            {
                cbTotalLossLiquid.Checked = true;
            }
            else
            {
                cbTotalLossLiquid.Checked = false;
            }

            m_EnableTotalLossLiquid = JisuWaveHogaSummitSysVar.EnableTotalLossLiquid;

            if (JisuWaveHogaSummitSysVar.EnableTotalProfitLiquid == true)
            {
                cbTotalProfitLiquid.Checked = true;
            }
            else
            {
                cbTotalProfitLiquid.Checked = false;
            }

            m_EnableTotalProfitLiquid = JisuWaveHogaSummitSysVar.EnableTotalProfitLiquid;


            if (JisuWaveHogaSummitSysVar.AutoOrder == true)
            {
                cbAutoOrder.Checked = true;
            }
            else
            {
                cbAutoOrder.Checked = false;
            }

            m_AutoOrder = JisuWaveHogaSummitSysVar.AutoOrder;

            tbPerOrderAmount.Text = JisuWaveHogaSummitSysVar.PerOrderAmount.ToString();

            m_PerOrderAmount = JisuWaveHogaSummitSysVar.PerOrderAmount;

            m_StepLiquidVal = JisuWaveHogaSummitSysVar.StepLiquidVal;
            m_EnableTotalProfitStepLiquid = JisuWaveHogaSummitSysVar.EnableTotalProfitStepLiquid;
            m_PerLiquidOrderAmount = JisuWaveHogaSummitSysVar.PerLiquidOrderAmount;


            m_EnableProfitTrailStop = JisuWaveHogaSummitSysVar.EnableProfitTrailStop;
            m_MaxProfitLiquidVal = JisuWaveHogaSummitSysVar.MaxProfitLiquidVal;
            m_MinProfit = JisuWaveHogaSummitSysVar.MinProfit;


            selectedIndex = comboStepLiquid.FindString(JisuWaveHogaSummitSysVar.StepLiquidVal.ToString());
            comboStepLiquid.SelectedIndex = selectedIndex;

            selectedIndex = comboMinProfit.FindString(JisuWaveHogaSummitSysVar.MinProfit.ToString());
            comboMinProfit.SelectedIndex = selectedIndex;

            selectedIndex = comboMaxProfitDelta.FindString(JisuWaveHogaSummitSysVar.MaxProfitLiquidVal.ToString());
            comboMaxProfitDelta.SelectedIndex = selectedIndex;

            if (JisuWaveHogaSummitSysVar.EnableProfitTrailStop == true)
            {
                cbEnableMaxProfitLiquid.Checked = true;
            }
            else
            {
                cbEnableMaxProfitLiquid.Checked = false;
            }

            if (JisuWaveHogaSummitSysVar.EnableTotalProfitStepLiquid == true)
            {
                cbEnableProfitStepLiquid.Checked = true;
            }
            else
            {
                cbEnableProfitStepLiquid.Checked = false;
            }

            m_OrderTarget = GlobalVar.OrderTargetFuture;
            if (JisuWaveHogaSummitSysVar.OrderTarget == GlobalVar.OrderTargetFuture)
            {
                rbFutureOrder.Checked = true;
                m_OrderTarget = GlobalVar.OrderTargetFuture;
            }
            else
            {
                rbOptionOrder.Checked = true;
                m_OrderTarget = GlobalVar.OrderTargetOption;
            }

            tbFirstMaxOrderAmount.Text = JisuWaveHogaSummitSysVar.FirstMaxOrderAmount.ToString();
            m_FirstMaxOrderAmount = JisuWaveHogaSummitSysVar.FirstMaxOrderAmount;
        }


        private void comboSystem_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboSystem.SelectedIndex < 0)
                m_SysType = 0;
            else
                m_SysType = comboSystem.SelectedIndex;
           
#region SysHourMin
            int sysEndHour = 0;
            int sysEndMin = 0;
            int sysStartHour = 0;
            int sysStartMin = 0;
            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                sysEndHour = JisuWaveHogaSummitSysVar.SysEndHour;
                sysEndMin = JisuWaveHogaSummitSysVar.SysEndMin;
                sysStartHour = JisuWaveHogaSummitSysVar.SysStartHour;
                sysStartMin = JisuWaveHogaSummitSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                sysEndHour = JisuWaveSysVar.SysEndHour;
                sysEndMin = JisuWaveSysVar.SysEndMin;
                sysStartHour = JisuWaveSysVar.SysStartHour;
                sysStartMin = JisuWaveSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                sysEndHour = HogaWaveSysVar.SysEndHour;
                sysEndMin = HogaWaveSysVar.SysEndMin;
                sysStartHour = HogaWaveSysVar.SysStartHour;
                sysStartMin = HogaWaveSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                sysEndHour = HogaSquareOccSysVar.SysEndHour;
                sysEndMin = HogaSquareOccSysVar.SysEndMin;
                sysStartHour = HogaSquareOccSysVar.SysStartHour;
                sysStartMin = HogaSquareOccSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                sysEndHour = HogaSummitSysVar.SysEndHour;
                sysEndMin = HogaSummitSysVar.SysEndMin;
                sysStartHour = HogaSummitSysVar.SysStartHour;
                sysStartMin = HogaSummitSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                sysEndHour = CallPutSquareOccSysVar.SysEndHour;
                sysEndMin = CallPutSquareOccSysVar.SysEndMin;
                sysStartHour = CallPutSquareOccSysVar.SysStartHour;
                sysStartMin = CallPutSquareOccSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                sysEndHour = PureHogaSummitSysVar.SysEndHour;
                sysEndMin = PureHogaSummitSysVar.SysEndMin;
                sysStartHour = PureHogaSummitSysVar.SysStartHour;
                sysStartMin = PureHogaSummitSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                sysEndHour = LooseHogaSummitSysVar.SysEndHour;
                sysEndMin = LooseHogaSummitSysVar.SysEndMin;
                sysStartHour = LooseHogaSummitSysVar.SysStartHour;
                sysStartMin = LooseHogaSummitSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                sysEndHour = CallPutInvDivSysVar.SysEndHour;
                sysEndMin = CallPutInvDivSysVar.SysEndMin;
                sysStartHour = CallPutInvDivSysVar.SysStartHour;
                sysStartMin = CallPutInvDivSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                sysEndHour = TipAttackSysVar.SysEndHour;
                sysEndMin = TipAttackSysVar.SysEndMin;
                sysStartHour = TipAttackSysVar.SysStartHour;
                sysStartMin = TipAttackSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                sysEndHour = OptPriceSysVar.SysEndHour;
                sysEndMin = OptPriceSysVar.SysEndMin;
                sysStartHour = OptPriceSysVar.SysStartHour;
                sysStartMin = OptPriceSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                sysEndHour = OptMainPriceSysVar.SysEndHour;
                sysEndMin = OptMainPriceSysVar.SysEndMin;
                sysStartHour = OptMainPriceSysVar.SysStartHour;
                sysStartMin = OptMainPriceSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                sysEndHour = OptCenterPriceSysVar.SysEndHour;
                sysEndMin = OptCenterPriceSysVar.SysEndMin;
                sysStartHour = OptCenterPriceSysVar.SysStartHour;
                sysStartMin = OptCenterPriceSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                sysEndHour = OptBothSellSysVar.SysEndHour;
                sysEndMin = OptBothSellSysVar.SysEndMin;
                sysStartHour = OptBothSellSysVar.SysStartHour;
                sysStartMin = OptBothSellSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                sysEndHour = OptBendSysVar.SysEndHour;
                sysEndMin = OptBendSysVar.SysEndMin;
                sysStartHour = OptBendSysVar.SysStartHour;
                sysStartMin = OptBendSysVar.SysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                sysEndHour = SubjectSysVar.SysEndHour;
                sysEndMin = SubjectSysVar.SysEndMin;
                sysStartHour = SubjectSysVar.SysStartHour;
                sysStartMin = SubjectSysVar.SysStartMin;
            }

            comboSysStateEndHour.SelectedIndex = sysEndHour;
            comboSysStateEndMin.SelectedIndex = sysEndMin;
            comboSysStateStartHour.SelectedIndex = sysStartHour;
            comboSysStateStartMin.SelectedIndex = sysStartMin;
#endregion

#region Order Settings
            bool AutoOrder = GlobalVar.AutoOrder;
            int OrderStartHour = GlobalVar.OrderStartHour;
            int OrderStartMin = GlobalVar.OrderStartMin;
            int OrderEndHour = GlobalVar.OrderEndHour;
            int OrderEndMin = GlobalVar.OrderEndMin;
            int OrderStartSignal = 1;
            int OrderEndSignal = 50;
            int PerOrderAmount = 1;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                AutoOrder = JisuWaveHogaSummitSysVar.AutoOrder;
                OrderStartHour = JisuWaveHogaSummitSysVar.OrderStartHour;
                OrderStartMin = JisuWaveHogaSummitSysVar.OrderStartMin;
                OrderEndHour = JisuWaveHogaSummitSysVar.OrderEndHour;
                OrderEndMin = JisuWaveHogaSummitSysVar.OrderEndMin;
                OrderStartSignal = JisuWaveHogaSummitSysVar.SysStartState;
                OrderEndSignal = JisuWaveHogaSummitSysVar.SysEndState;
                PerOrderAmount = JisuWaveHogaSummitSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                AutoOrder = HogaWaveSysVar.AutoOrder;
                OrderStartHour = HogaWaveSysVar.OrderStartHour;
                OrderStartMin = HogaWaveSysVar.OrderStartMin;
                OrderEndHour = HogaWaveSysVar.OrderEndHour;
                OrderEndMin = HogaWaveSysVar.OrderEndMin;
                OrderStartSignal = HogaWaveSysVar.SysStartState;
                OrderEndSignal = HogaWaveSysVar.SysEndState;
                PerOrderAmount = HogaWaveSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                AutoOrder = JisuWaveSysVar.AutoOrder;
                OrderStartHour = JisuWaveSysVar.OrderStartHour;
                OrderStartMin = JisuWaveSysVar.OrderStartMin;
                OrderEndHour = JisuWaveSysVar.OrderEndHour;
                OrderEndMin = JisuWaveSysVar.OrderEndMin;
                OrderStartSignal = JisuWaveSysVar.SysStartState;
                OrderEndSignal = JisuWaveSysVar.SysEndState;
                PerOrderAmount = JisuWaveSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                AutoOrder = HogaSquareOccSysVar.AutoOrder;
                OrderStartHour = HogaSquareOccSysVar.OrderStartHour;
                OrderStartMin = HogaSquareOccSysVar.OrderStartMin;
                OrderEndHour = HogaSquareOccSysVar.OrderEndHour;
                OrderEndMin = HogaSquareOccSysVar.OrderEndMin;
                OrderStartSignal = HogaSquareOccSysVar.SysStartState;
                OrderEndSignal = HogaSquareOccSysVar.SysEndState;
                PerOrderAmount = HogaSquareOccSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                AutoOrder = HogaSummitSysVar.AutoOrder;
                OrderStartHour = HogaSummitSysVar.OrderStartHour;
                OrderStartMin = HogaSummitSysVar.OrderStartMin;
                OrderEndHour = HogaSummitSysVar.OrderEndHour;
                OrderEndMin = HogaSummitSysVar.OrderEndMin;
                OrderStartSignal = HogaSummitSysVar.SysStartState;
                OrderEndSignal = HogaSummitSysVar.SysEndState;
                PerOrderAmount = HogaSummitSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                AutoOrder = CallPutSquareOccSysVar.AutoOrder;
                OrderStartHour = CallPutSquareOccSysVar.OrderStartHour;
                OrderStartMin = CallPutSquareOccSysVar.OrderStartMin;
                OrderEndHour = CallPutSquareOccSysVar.OrderEndHour;
                OrderEndMin = CallPutSquareOccSysVar.OrderEndMin;
                OrderStartSignal = CallPutSquareOccSysVar.SysStartState;
                OrderEndSignal = CallPutSquareOccSysVar.SysEndState;
                PerOrderAmount = CallPutSquareOccSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                AutoOrder = PureHogaSummitSysVar.AutoOrder;
                OrderStartHour = PureHogaSummitSysVar.OrderStartHour;
                OrderStartMin = PureHogaSummitSysVar.OrderStartMin;
                OrderEndHour = PureHogaSummitSysVar.OrderEndHour;
                OrderEndMin = PureHogaSummitSysVar.OrderEndMin;
                OrderStartSignal = PureHogaSummitSysVar.SysStartState;
                OrderEndSignal = PureHogaSummitSysVar.SysEndState;
                PerOrderAmount = PureHogaSummitSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                AutoOrder = LooseHogaSummitSysVar.AutoOrder;
                OrderStartHour = LooseHogaSummitSysVar.OrderStartHour;
                OrderStartMin = LooseHogaSummitSysVar.OrderStartMin;
                OrderEndHour = LooseHogaSummitSysVar.OrderEndHour;
                OrderEndMin = LooseHogaSummitSysVar.OrderEndMin;
                OrderStartSignal = LooseHogaSummitSysVar.SysStartState;
                OrderEndSignal = LooseHogaSummitSysVar.SysEndState;
                PerOrderAmount = LooseHogaSummitSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                AutoOrder = CallPutInvDivSysVar.AutoOrder;
                OrderStartHour = CallPutInvDivSysVar.OrderStartHour;
                OrderStartMin = CallPutInvDivSysVar.OrderStartMin;
                OrderEndHour = CallPutInvDivSysVar.OrderEndHour;
                OrderEndMin = CallPutInvDivSysVar.OrderEndMin;
                OrderStartSignal = CallPutInvDivSysVar.SysStartState;
                OrderEndSignal = CallPutInvDivSysVar.SysEndState;
                PerOrderAmount = CallPutInvDivSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                AutoOrder = TipAttackSysVar.AutoOrder;
                OrderStartHour = TipAttackSysVar.OrderStartHour;
                OrderStartMin = TipAttackSysVar.OrderStartMin;
                OrderEndHour = TipAttackSysVar.OrderEndHour;
                OrderEndMin = TipAttackSysVar.OrderEndMin;
                OrderStartSignal = TipAttackSysVar.SysStartState;
                OrderEndSignal = TipAttackSysVar.SysEndState;
                PerOrderAmount = TipAttackSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                AutoOrder = OptPriceSysVar.AutoOrder;
                OrderStartHour = OptPriceSysVar.OrderStartHour;
                OrderStartMin = OptPriceSysVar.OrderStartMin;
                OrderEndHour = OptPriceSysVar.OrderEndHour;
                OrderEndMin = OptPriceSysVar.OrderEndMin;
                OrderStartSignal = OptPriceSysVar.SysStartState;
                OrderEndSignal = OptPriceSysVar.SysEndState;
                PerOrderAmount = OptPriceSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                AutoOrder = OptMainPriceSysVar.AutoOrder;
                OrderStartHour = OptMainPriceSysVar.OrderStartHour;
                OrderStartMin = OptMainPriceSysVar.OrderStartMin;
                OrderEndHour = OptMainPriceSysVar.OrderEndHour;
                OrderEndMin = OptMainPriceSysVar.OrderEndMin;
                OrderStartSignal = OptMainPriceSysVar.SysStartState;
                OrderEndSignal = OptMainPriceSysVar.SysEndState;
                PerOrderAmount = OptMainPriceSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                AutoOrder = OptCenterPriceSysVar.AutoOrder;
                OrderStartHour = OptCenterPriceSysVar.OrderStartHour;
                OrderStartMin = OptCenterPriceSysVar.OrderStartMin;
                OrderEndHour = OptCenterPriceSysVar.OrderEndHour;
                OrderEndMin = OptCenterPriceSysVar.OrderEndMin;
                OrderStartSignal = OptCenterPriceSysVar.SysStartState;
                OrderEndSignal = OptCenterPriceSysVar.SysEndState;
                PerOrderAmount = OptCenterPriceSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                AutoOrder = OptBothSellSysVar.AutoOrder;
                OrderStartHour = OptBothSellSysVar.OrderStartHour;
                OrderStartMin = OptBothSellSysVar.OrderStartMin;
                OrderEndHour = OptBothSellSysVar.OrderEndHour;
                OrderEndMin = OptBothSellSysVar.OrderEndMin;
                OrderStartSignal = OptBothSellSysVar.SysStartState;
                OrderEndSignal = OptBothSellSysVar.SysEndState;
                PerOrderAmount = OptBothSellSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                AutoOrder = OptBendSysVar.AutoOrder;
                OrderStartHour = OptBendSysVar.OrderStartHour;
                OrderStartMin = OptBendSysVar.OrderStartMin;
                OrderEndHour = OptBendSysVar.OrderEndHour;
                OrderEndMin = OptBendSysVar.OrderEndMin;
                OrderStartSignal = OptBendSysVar.SysStartState;
                OrderEndSignal = OptBendSysVar.SysEndState;
                PerOrderAmount = OptBendSysVar.PerOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                AutoOrder = SubjectSysVar.AutoOrder;
                OrderStartHour = SubjectSysVar.OrderStartHour;
                OrderStartMin = SubjectSysVar.OrderStartMin;
                OrderEndHour = SubjectSysVar.OrderEndHour;
                OrderEndMin = SubjectSysVar.OrderEndMin;
                OrderStartSignal = SubjectSysVar.SysStartState;
                OrderEndSignal = SubjectSysVar.SysEndState;
                PerOrderAmount = SubjectSysVar.PerOrderAmount;
            }


            comboOrderStartHour.SelectedIndex = OrderStartHour;
            comboOrderStartMin.SelectedIndex = OrderStartMin;
            comboOrderEndHour.SelectedIndex = OrderEndHour;
            comboOrderEndMin.SelectedIndex = OrderEndMin;
            comboOrderStartState.SelectedIndex = OrderStartSignal;
            comboOrderEndState.SelectedIndex = OrderEndSignal;

            if (AutoOrder == true)
            {
                cbAutoOrder.Checked = true;
            }
            else
            {
                cbAutoOrder.Checked = false;
            }

            tbPerOrderAmount.Text = PerOrderAmount.ToString();

#endregion

#region LossNProfit
            bool enableTotalProfitLiquid = false;
            bool enableTotalLossLiquid = false;
            bool enablePerProfitLiquid = false;
            bool enablePerLossLiquid = false;
            double totalProfitLiquidValue = 0.0;
            double totalLossLiquidValue = 0.0;
            double perProfitLiquidValue = 0.0;
            double perLossLiquidValue = 0.0;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                enableTotalProfitLiquid = JisuWaveHogaSummitSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = JisuWaveHogaSummitSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = JisuWaveHogaSummitSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = JisuWaveHogaSummitSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = JisuWaveHogaSummitSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = JisuWaveHogaSummitSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = JisuWaveHogaSummitSysVar.PerProfitLiquidValue;
                perLossLiquidValue = JisuWaveHogaSummitSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                enableTotalProfitLiquid = JisuWaveSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = JisuWaveSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = JisuWaveSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = JisuWaveSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = JisuWaveSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = JisuWaveSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = JisuWaveSysVar.PerProfitLiquidValue;
                perLossLiquidValue = JisuWaveSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                enableTotalProfitLiquid = HogaWaveSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = HogaWaveSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = HogaWaveSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = HogaWaveSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = HogaWaveSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = HogaWaveSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = HogaWaveSysVar.PerProfitLiquidValue;
                perLossLiquidValue = HogaWaveSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                enableTotalProfitLiquid = HogaSquareOccSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = HogaSquareOccSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = HogaSquareOccSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = HogaSquareOccSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = HogaSquareOccSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = HogaSquareOccSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = HogaSquareOccSysVar.PerProfitLiquidValue;
                perLossLiquidValue = HogaSquareOccSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                enableTotalProfitLiquid = HogaSummitSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = HogaSummitSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = HogaSummitSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = HogaSummitSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = HogaSummitSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = HogaSummitSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = HogaSummitSysVar.PerProfitLiquidValue;
                perLossLiquidValue = HogaSummitSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                enableTotalProfitLiquid = CallPutSquareOccSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = CallPutSquareOccSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = CallPutSquareOccSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = CallPutSquareOccSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = CallPutSquareOccSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = CallPutSquareOccSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = CallPutSquareOccSysVar.PerProfitLiquidValue;
                perLossLiquidValue = CallPutSquareOccSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                enableTotalProfitLiquid = PureHogaSummitSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = PureHogaSummitSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = PureHogaSummitSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = PureHogaSummitSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = PureHogaSummitSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = PureHogaSummitSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = PureHogaSummitSysVar.PerProfitLiquidValue;
                perLossLiquidValue = PureHogaSummitSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                enableTotalProfitLiquid = LooseHogaSummitSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = LooseHogaSummitSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = LooseHogaSummitSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = LooseHogaSummitSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = LooseHogaSummitSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = LooseHogaSummitSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = LooseHogaSummitSysVar.PerProfitLiquidValue;
                perLossLiquidValue = LooseHogaSummitSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                enableTotalProfitLiquid = CallPutInvDivSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = CallPutInvDivSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = CallPutInvDivSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = CallPutInvDivSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = CallPutInvDivSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = CallPutInvDivSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = CallPutInvDivSysVar.PerProfitLiquidValue;
                perLossLiquidValue = CallPutInvDivSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                enableTotalProfitLiquid = TipAttackSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = TipAttackSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = TipAttackSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = TipAttackSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = TipAttackSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = TipAttackSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = TipAttackSysVar.PerProfitLiquidValue;
                perLossLiquidValue = TipAttackSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                enableTotalProfitLiquid = OptPriceSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = OptPriceSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = OptPriceSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = OptPriceSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = OptPriceSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = OptPriceSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = OptPriceSysVar.PerProfitLiquidValue;
                perLossLiquidValue = OptPriceSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                enableTotalProfitLiquid = OptMainPriceSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = OptMainPriceSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = OptMainPriceSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = OptMainPriceSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = OptMainPriceSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = OptMainPriceSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = OptMainPriceSysVar.PerProfitLiquidValue;
                perLossLiquidValue = OptMainPriceSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                enableTotalProfitLiquid = OptCenterPriceSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = OptCenterPriceSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = OptCenterPriceSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = OptCenterPriceSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = OptCenterPriceSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = OptCenterPriceSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = OptCenterPriceSysVar.PerProfitLiquidValue;
                perLossLiquidValue = OptCenterPriceSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                enableTotalProfitLiquid = OptBothSellSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = OptBothSellSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = OptBothSellSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = OptBothSellSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = OptBothSellSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = OptBothSellSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = OptBothSellSysVar.PerProfitLiquidValue;
                perLossLiquidValue = OptBothSellSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                enableTotalProfitLiquid = OptBendSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = OptBendSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = OptBendSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = OptBendSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = OptBendSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = OptBendSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = OptBendSysVar.PerProfitLiquidValue;
                perLossLiquidValue = OptBendSysVar.PerLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                enableTotalProfitLiquid = SubjectSysVar.EnableTotalProfitLiquid;
                enableTotalLossLiquid = SubjectSysVar.EnableTotalLossLiquid;
                enablePerProfitLiquid = SubjectSysVar.EnablePerProfitLiquid;
                enablePerLossLiquid = SubjectSysVar.EnablePerLossLiquid;
                totalProfitLiquidValue = SubjectSysVar.TotalProfitLiquidValue;
                totalLossLiquidValue = SubjectSysVar.TotalLossLiquidValue;
                perProfitLiquidValue = SubjectSysVar.PerProfitLiquidValue;
                perLossLiquidValue = SubjectSysVar.PerLossLiquidValue;
            }



            int selectedIndex = comboPerLoss.FindString(perLossLiquidValue.ToString());
            comboPerLoss.SelectedIndex = selectedIndex;
            selectedIndex = comboPerProfit.FindString(perProfitLiquidValue.ToString());
            comboPerProfit.SelectedIndex = selectedIndex;
            selectedIndex = comboTotalLoss.FindString(totalLossLiquidValue.ToString());
            comboTotalLoss.SelectedIndex = selectedIndex;
            selectedIndex = comboTotalProfit.FindString(totalProfitLiquidValue.ToString());
            comboTotalProfit.SelectedIndex = selectedIndex;

            if (enablePerLossLiquid == true)
            {
                cbPerLossLiquid.Checked = true;
            }
            else
            {
                cbPerLossLiquid.Checked = false;
            }

            if (enablePerProfitLiquid == true)
            {
                cbPerProfitLiquid.Checked = true;
            }
            else
            {
                cbPerProfitLiquid.Checked = false;
            }

            if (enableTotalLossLiquid == true)
            {
                cbTotalLossLiquid.Checked = true;
            }
            else
            {
                cbTotalLossLiquid.Checked = false;
            }

            if (enableTotalProfitLiquid == true)
            {
                cbTotalProfitLiquid.Checked = true;
            }
            else
            {
                cbTotalProfitLiquid.Checked = false;
            }
#endregion

            bool EnableTotalProfitStepLiquid = false;
            bool EnableProfitTrailStop = false;
            double StepLiquidVal = 0.0;
            double MaxProfitLiquidVal = 0.0;
            double MinProfit = 0.0;
            int PerLiquidOrderAmount = 1;
            int OrderTarget = GlobalVar.OrderTargetFuture;
            int FirstMaxOrderAmount = 3;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                EnableTotalProfitStepLiquid = JisuWaveHogaSummitSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = JisuWaveHogaSummitSysVar.EnableProfitTrailStop;
                StepLiquidVal = JisuWaveHogaSummitSysVar.StepLiquidVal;
                MaxProfitLiquidVal = JisuWaveHogaSummitSysVar.MaxProfitLiquidVal;
                MinProfit = JisuWaveHogaSummitSysVar.MinProfit;
                PerLiquidOrderAmount = JisuWaveHogaSummitSysVar.PerLiquidOrderAmount;

                OrderTarget = JisuWaveHogaSummitSysVar.OrderTarget;
                FirstMaxOrderAmount = JisuWaveHogaSummitSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                EnableTotalProfitStepLiquid = JisuWaveSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = JisuWaveSysVar.EnableProfitTrailStop;
                StepLiquidVal = JisuWaveSysVar.StepLiquidVal;
                MaxProfitLiquidVal = JisuWaveSysVar.MaxProfitLiquidVal;
                MinProfit = JisuWaveSysVar.MinProfit;
                PerLiquidOrderAmount = JisuWaveSysVar.PerLiquidOrderAmount;
                OrderTarget = JisuWaveSysVar.OrderTarget;
                FirstMaxOrderAmount = JisuWaveSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                EnableTotalProfitStepLiquid = HogaWaveSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = HogaWaveSysVar.EnableProfitTrailStop;
                StepLiquidVal = HogaWaveSysVar.StepLiquidVal;
                MaxProfitLiquidVal = HogaWaveSysVar.MaxProfitLiquidVal;
                MinProfit = HogaWaveSysVar.MinProfit;
                PerLiquidOrderAmount = HogaWaveSysVar.PerLiquidOrderAmount;
                OrderTarget = HogaWaveSysVar.OrderTarget;
                FirstMaxOrderAmount = HogaWaveSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                EnableTotalProfitStepLiquid = HogaSquareOccSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = HogaSquareOccSysVar.EnableProfitTrailStop;
                StepLiquidVal = HogaSquareOccSysVar.StepLiquidVal;
                MaxProfitLiquidVal = HogaSquareOccSysVar.MaxProfitLiquidVal;
                MinProfit = HogaSquareOccSysVar.MinProfit;
                PerLiquidOrderAmount = HogaSquareOccSysVar.PerLiquidOrderAmount;

                OrderTarget = HogaSquareOccSysVar.OrderTarget;
                FirstMaxOrderAmount = HogaSquareOccSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                EnableTotalProfitStepLiquid = HogaSummitSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = HogaSummitSysVar.EnableProfitTrailStop;
                StepLiquidVal = HogaSummitSysVar.StepLiquidVal;
                MaxProfitLiquidVal = HogaSummitSysVar.MaxProfitLiquidVal;
                MinProfit = HogaSummitSysVar.MinProfit;
                PerLiquidOrderAmount = HogaSummitSysVar.PerLiquidOrderAmount;

                OrderTarget = HogaSummitSysVar.OrderTarget;
                FirstMaxOrderAmount = HogaSummitSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                EnableTotalProfitStepLiquid = CallPutSquareOccSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = CallPutSquareOccSysVar.EnableProfitTrailStop;
                StepLiquidVal = CallPutSquareOccSysVar.StepLiquidVal;
                MaxProfitLiquidVal = CallPutSquareOccSysVar.MaxProfitLiquidVal;
                MinProfit = CallPutSquareOccSysVar.MinProfit;
                PerLiquidOrderAmount = CallPutSquareOccSysVar.PerLiquidOrderAmount;

                OrderTarget = CallPutSquareOccSysVar.OrderTarget;
                FirstMaxOrderAmount = CallPutSquareOccSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                EnableTotalProfitStepLiquid = PureHogaSummitSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = PureHogaSummitSysVar.EnableProfitTrailStop;
                StepLiquidVal = PureHogaSummitSysVar.StepLiquidVal;
                MaxProfitLiquidVal = PureHogaSummitSysVar.MaxProfitLiquidVal;
                MinProfit = PureHogaSummitSysVar.MinProfit;
                PerLiquidOrderAmount = PureHogaSummitSysVar.PerLiquidOrderAmount;

                OrderTarget = PureHogaSummitSysVar.OrderTarget;
                FirstMaxOrderAmount = PureHogaSummitSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                EnableTotalProfitStepLiquid = LooseHogaSummitSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = LooseHogaSummitSysVar.EnableProfitTrailStop;
                StepLiquidVal = LooseHogaSummitSysVar.StepLiquidVal;
                MaxProfitLiquidVal = LooseHogaSummitSysVar.MaxProfitLiquidVal;
                MinProfit = LooseHogaSummitSysVar.MinProfit;
                PerLiquidOrderAmount = LooseHogaSummitSysVar.PerLiquidOrderAmount;

                OrderTarget = LooseHogaSummitSysVar.OrderTarget;
                FirstMaxOrderAmount = LooseHogaSummitSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                EnableTotalProfitStepLiquid = CallPutInvDivSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = CallPutInvDivSysVar.EnableProfitTrailStop;
                StepLiquidVal = CallPutInvDivSysVar.StepLiquidVal;
                MaxProfitLiquidVal = CallPutInvDivSysVar.MaxProfitLiquidVal;
                MinProfit = CallPutInvDivSysVar.MinProfit;
                PerLiquidOrderAmount = CallPutInvDivSysVar.PerLiquidOrderAmount;

                OrderTarget = CallPutInvDivSysVar.OrderTarget;
                FirstMaxOrderAmount = CallPutInvDivSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                EnableTotalProfitStepLiquid = TipAttackSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = TipAttackSysVar.EnableProfitTrailStop;
                StepLiquidVal = TipAttackSysVar.StepLiquidVal;
                MaxProfitLiquidVal = TipAttackSysVar.MaxProfitLiquidVal;
                MinProfit = TipAttackSysVar.MinProfit;
                PerLiquidOrderAmount = TipAttackSysVar.PerLiquidOrderAmount;
                OrderTarget = TipAttackSysVar.OrderTarget;
                FirstMaxOrderAmount = TipAttackSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                EnableTotalProfitStepLiquid = OptPriceSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = OptPriceSysVar.EnableProfitTrailStop;
                StepLiquidVal = OptPriceSysVar.StepLiquidVal;
                MaxProfitLiquidVal = OptPriceSysVar.MaxProfitLiquidVal;
                MinProfit = OptPriceSysVar.MinProfit;
                PerLiquidOrderAmount = OptPriceSysVar.PerLiquidOrderAmount;

                OrderTarget = OptPriceSysVar.OrderTarget;
                FirstMaxOrderAmount = OptPriceSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                EnableTotalProfitStepLiquid = OptMainPriceSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = OptMainPriceSysVar.EnableProfitTrailStop;
                StepLiquidVal = OptMainPriceSysVar.StepLiquidVal;
                MaxProfitLiquidVal = OptMainPriceSysVar.MaxProfitLiquidVal;
                MinProfit = OptMainPriceSysVar.MinProfit;
                PerLiquidOrderAmount = OptMainPriceSysVar.PerLiquidOrderAmount;

                OrderTarget = OptMainPriceSysVar.OrderTarget;
                FirstMaxOrderAmount = OptMainPriceSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                EnableTotalProfitStepLiquid = OptCenterPriceSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = OptCenterPriceSysVar.EnableProfitTrailStop;
                StepLiquidVal = OptCenterPriceSysVar.StepLiquidVal;
                MaxProfitLiquidVal = OptCenterPriceSysVar.MaxProfitLiquidVal;
                MinProfit = OptCenterPriceSysVar.MinProfit;
                PerLiquidOrderAmount = OptCenterPriceSysVar.PerLiquidOrderAmount;

                OrderTarget = OptCenterPriceSysVar.OrderTarget;
                FirstMaxOrderAmount = OptCenterPriceSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                EnableTotalProfitStepLiquid = OptBothSellSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = OptBothSellSysVar.EnableProfitTrailStop;
                StepLiquidVal = OptBothSellSysVar.StepLiquidVal;
                MaxProfitLiquidVal = OptBothSellSysVar.MaxProfitLiquidVal;
                MinProfit = OptBothSellSysVar.MinProfit;
                PerLiquidOrderAmount = OptBothSellSysVar.PerLiquidOrderAmount;

                OrderTarget = OptBothSellSysVar.OrderTarget;
                FirstMaxOrderAmount = OptBothSellSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                EnableTotalProfitStepLiquid = OptBendSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = OptBendSysVar.EnableProfitTrailStop;
                StepLiquidVal = OptBendSysVar.StepLiquidVal;
                MaxProfitLiquidVal = OptBendSysVar.MaxProfitLiquidVal;
                MinProfit = OptBendSysVar.MinProfit;
                PerLiquidOrderAmount = OptBendSysVar.PerLiquidOrderAmount;

                OrderTarget = OptBendSysVar.OrderTarget;
                FirstMaxOrderAmount = OptBendSysVar.FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                EnableTotalProfitStepLiquid = SubjectSysVar.EnableTotalProfitStepLiquid;
                EnableProfitTrailStop = SubjectSysVar.EnableProfitTrailStop;
                StepLiquidVal = SubjectSysVar.StepLiquidVal;
                MaxProfitLiquidVal = SubjectSysVar.MaxProfitLiquidVal;
                MinProfit = SubjectSysVar.MinProfit;
                PerLiquidOrderAmount = SubjectSysVar.PerLiquidOrderAmount;

                OrderTarget = SubjectSysVar.OrderTarget;
                FirstMaxOrderAmount = SubjectSysVar.FirstMaxOrderAmount;
            }


            selectedIndex = comboStepLiquid.FindString(StepLiquidVal.ToString());
            comboStepLiquid.SelectedIndex = selectedIndex;
            selectedIndex = comboMinProfit.FindString(MinProfit.ToString());
            comboMinProfit.SelectedIndex = selectedIndex;
            selectedIndex = comboMaxProfitDelta.FindString(MaxProfitLiquidVal.ToString());
            comboMaxProfitDelta.SelectedIndex = selectedIndex;

            if (EnableTotalProfitStepLiquid == true)
            {
                cbEnableProfitStepLiquid.Checked = true;
            }
            else
            {
                cbEnableProfitStepLiquid.Checked = false;
            }

            if (EnableProfitTrailStop == true)
            {
                cbEnableMaxProfitLiquid.Checked = true;
            }
            else
            {
                cbEnableMaxProfitLiquid.Checked = false;
            }

            tbPerLiquidAmount.Text = PerLiquidOrderAmount.ToString();

            if (OrderTarget == GlobalVar.OrderTargetFuture)
                rbFutureOrder.Checked = true;
            else
                rbOptionOrder.Checked = true;

            tbFirstMaxOrderAmount.Text = FirstMaxOrderAmount.ToString();

#region Step Liquid

#endregion

        }

        private void comboFirstSig_SelectedIndexChanged(object sender, EventArgs e)
        {
            int selectedIndex = comboFirstSig.SelectedIndex;
            if (selectedIndex == -1)
                return;
        }

        private void btnSetFirstSignal_Click(object sender, EventArgs e)
        {
            System.Windows.Forms.Form frmchild = new EasyTrader.Form.FirstSigSetFrm();
            frmchild.Show();
        }

        private void comboSysStateStartHour_SelectedIndexChanged(object sender, EventArgs e)
        {
            int sysStartHour = comboSysStateStartHour.SelectedIndex;
            if (sysStartHour < 0)
                return;

            m_SysStartHour = sysStartHour;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.SysStartHour = sysStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.SysStartHour = sysStartHour;
            }
        }

        private void comboSysStateStartMin_SelectedIndexChanged(object sender, EventArgs e)
        {
            int sysStartMin = comboSysStateStartMin.SelectedIndex;
            if (sysStartMin < 0)
                return;

            m_SysStartMin = sysStartMin;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.SysStartMin = sysStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.SysStartMin = sysStartMin;
            }
        }

        private void comboSysStateEndHour_SelectedIndexChanged(object sender, EventArgs e)
        {
            int sysEndHour = comboSysStateEndHour.SelectedIndex;
            if (sysEndHour < 0)
                return;

            m_SysEndHour = sysEndHour;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.SysEndHour = sysEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.SysEndHour = sysEndHour;
            }
        }

        private void comboSysStateEndMin_SelectedIndexChanged(object sender, EventArgs e)
        {
            int sysEndMin = comboSysStateEndMin.SelectedIndex;
            if (sysEndMin < 0)
                return;

            m_SysEndMin = sysEndMin;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.SysEndMin = sysEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.SysEndMin = sysEndMin;
            }
        }

        private void comboOrderStartHour_SelectedIndexChanged(object sender, EventArgs e)
        {
            int orderStartHour = comboOrderStartHour.SelectedIndex;
            if (orderStartHour < 0)
                return;

            m_OrderStartHour = orderStartHour;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.OrderStartHour = orderStartHour;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.OrderStartHour = orderStartHour;
            }
        }

        private void comboOrderStartMin_SelectedIndexChanged(object sender, EventArgs e)
        {
            int orderStartMin = comboOrderStartMin.SelectedIndex;
            if (orderStartMin < 0)
                return;

            m_OrderStartMin = orderStartMin;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.OrderStartMin = orderStartMin;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.OrderStartMin = orderStartMin;
            }
        }

        private void comboOrderEndHour_SelectedIndexChanged(object sender, EventArgs e)
        {
            int orderEndHour = comboOrderEndHour.SelectedIndex;
            if (orderEndHour < 0)
                return;

            m_OrderEndHour = orderEndHour;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.OrderEndHour = orderEndHour;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.OrderEndHour = orderEndHour;
            }
        }

        private void comboOrderEndMin_SelectedIndexChanged(object sender, EventArgs e)
        {
            int orderEndMin = comboOrderEndMin.SelectedIndex;
            if (orderEndMin < 0)
                return;

            m_OrderEndMin = orderEndMin;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.OrderEndMin = orderEndMin;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.OrderEndMin = orderEndMin;
            }
        }

        private void comboOrderStartState_SelectedIndexChanged(object sender, EventArgs e)
        {
            int sysStartState = comboOrderStartState.SelectedIndex;
            if (sysStartState < 0)
                return;

            m_OrderStartSignal = sysStartState;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.SysStartState = sysStartState;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.SysStartState = sysStartState;
            }
        }

        private void comboOrderEndState_SelectedIndexChanged(object sender, EventArgs e)
        {
            int sysEndState = comboOrderEndState.SelectedIndex;
            if (sysEndState < 0)
                return;

            m_OrderEndSignal = sysEndState;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.SysEndState = sysEndState;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.SysEndState = sysEndState;
            }
        }

        private void cbPerLossLiquid_CheckedChanged(object sender, EventArgs e)
        {
            bool enablePerLossLiquid = false;
            if (cbPerLossLiquid.Checked == true)
            {
                enablePerLossLiquid = true;
            }
            else
            {
                enablePerLossLiquid = false;
            }

            m_EnablePerLossLiquid = enablePerLossLiquid;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.EnablePerLossLiquid = enablePerLossLiquid;
            }
        }

        private void cbPerProfitLiquid_CheckedChanged(object sender, EventArgs e)
        {
            bool enablePerProfitLiquid = false;
            if (cbPerProfitLiquid.Checked == true)
            {
                enablePerProfitLiquid = true;
            }
            else
            {
                enablePerProfitLiquid = false;
            }

            m_EnablePerProfitLiquid = enablePerProfitLiquid;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.EnablePerProfitLiquid = enablePerProfitLiquid;
            }
        }

        private void comboPerLoss_SelectedIndexChanged(object sender, EventArgs e)
        {
            string selText = comboPerLoss.SelectedItem.ToString();
            if (selText == "")
                return;
            double perLossLiquidValue = Convert.ToDouble(selText);

            m_PerLossLiquidValue = perLossLiquidValue;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.PerLossLiquidValue = perLossLiquidValue;
            }
        }

        private void comboPerProfit_SelectedIndexChanged(object sender, EventArgs e)
        {
            string selText = comboPerProfit.SelectedItem.ToString();
            if (selText == "")
                return;
            double perProfitLiquidValue = Convert.ToDouble(selText);

            m_PerProfitLiquidValue = perProfitLiquidValue;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.PerProfitLiquidValue = perProfitLiquidValue;
            }
        }

        private void cbTotalLossLiquid_CheckedChanged(object sender, EventArgs e)
        {
            bool enableTotalLossLiquid = false;
            if (cbTotalLossLiquid.Checked == true)
            {
                enableTotalLossLiquid = true;
            }
            else
            {
                enableTotalLossLiquid = false;
            }

            m_EnableTotalLossLiquid = enableTotalLossLiquid;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.EnableTotalLossLiquid = enableTotalLossLiquid;
            }
        }

        private void comboTotalLoss_SelectedIndexChanged(object sender, EventArgs e)
        {
            string selText = comboTotalLoss.SelectedItem.ToString();
            if (selText == "")
                return;
            double totalLossLiquidValue = Convert.ToDouble(selText);

            m_TotalLossLiquidValue = totalLossLiquidValue;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.TotalLossLiquidValue = totalLossLiquidValue;
            }
        }

        private void cbTotalProfitLiquid_CheckedChanged(object sender, EventArgs e)
        {
            bool enableTotalProfitLiquid = false;
            if (cbTotalProfitLiquid.Checked == true)
            {
                enableTotalProfitLiquid = true;
            }
            else
            {
                enableTotalProfitLiquid = false;
            }

            m_EnableTotalProfitLiquid = enableTotalProfitLiquid;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.EnableTotalProfitLiquid = enableTotalProfitLiquid;
            }
        }

        private void comboTotalProfit_SelectedIndexChanged(object sender, EventArgs e)
        {
            string selText = comboTotalProfit.SelectedItem.ToString();
            if (selText == "")
                return;
            double totalProfitLiquidValue = Convert.ToDouble(selText);

            m_TotalProfitLiquidValue = totalProfitLiquidValue;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.TotalProfitLiquidValue = totalProfitLiquidValue;
            }
        }

        private void tbPerOrderAmount_TextChanged(object sender, EventArgs e)
        {
            string selText = tbPerOrderAmount.Text;
            if (selText == "")
                return;
            int perOrderAmount = Convert.ToInt32(selText);

            m_PerOrderAmount = perOrderAmount;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.PerOrderAmount = perOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.PerOrderAmount = perOrderAmount;
            }
        }

        private void cbAutoOrder_CheckedChanged(object sender, EventArgs e)
        {
            bool autoOrder = false;
            if (cbAutoOrder.Checked == true)
            {
                autoOrder = true;
            }
            else
            {
                autoOrder = false;
            }

            m_AutoOrder = autoOrder;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.AutoOrder = autoOrder;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.AutoOrder = autoOrder;
            }
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            string regSubkey = "Software\\EasyTrader\\SysVar\\JisuWaveHogaSummitSysVar";
            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\JisuWaveHogaSummitSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\JisuWaveSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\HogaWaveSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\HogaSquareOccSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\HogaSummitSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\CallPutSquareOccSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\PureHogaSummitSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\LooseHogaSummitSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\CallPutInvDivSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\TipAttackSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\OptPriceSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\OptMainPriceSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\OptCenterPriceSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\OptBothSellSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\OptBendSysVar";
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                regSubkey = "Software\\EasyTrader\\SysVar\\SubjectSysVar";
            }

            // 서브키를 얻어온다. 없으면 null
            RegistryKey rk = Registry.CurrentUser.OpenSubKey(regSubkey, true);
            // 없으면 서브키를 만든다.
            if (rk == null)
            {
                // 해당이름으로 서브키 생성
                rk = Registry.CurrentUser.CreateSubKey(regSubkey);
            }

            // 서브키 아래 값 쓰기
            //rk.SetValue("BuySellRefRange", GlobalVar.BuySellRefRange.ToString());

            rk.SetValue("SysStartHour", m_SysStartHour.ToString());
            rk.SetValue("SysStartMin", m_SysStartMin.ToString());
            rk.SetValue("SysEndHour", m_SysEndHour.ToString());
            rk.SetValue("SysEndMin", m_SysEndMin.ToString());

            rk.SetValue("OrderStartHour", m_OrderStartHour.ToString());
            rk.SetValue("OrderStartMin", m_OrderStartMin.ToString());
            rk.SetValue("OrderEndHour", m_OrderEndHour.ToString());
            rk.SetValue("OrderEndMin", m_OrderEndMin.ToString());
            rk.SetValue("OrderStartSignal", m_OrderStartSignal.ToString());
            rk.SetValue("OrderEndSignal", m_OrderEndSignal.ToString());


            rk.SetValue("TotalLossLiquidValue", m_TotalLossLiquidValue.ToString());
            rk.SetValue("TotalProfitLiquidValue", m_TotalProfitLiquidValue.ToString());
            rk.SetValue("PerLossLiquidValue", m_PerLossLiquidValue.ToString());
            rk.SetValue("PerProfitLiquidValue", m_PerProfitLiquidValue.ToString());

            rk.SetValue("PerOrderAmount", m_PerOrderAmount.ToString());


            rk.SetValue("StepLiquidVal", m_StepLiquidVal.ToString());
            rk.SetValue("MaxProfitLiquidVal", m_MaxProfitLiquidVal.ToString());
            rk.SetValue("MinProfit", m_MinProfit.ToString());

            rk.SetValue("PerLiquidOrderAmount", m_PerLiquidOrderAmount.ToString());

            if (m_AutoOrder == true)
                rk.SetValue("AutoOrder", "True");
            else
                rk.SetValue("AutoOrder", "False");

            if (m_EnablePerLossLiquid == true)
                rk.SetValue("EnablePerLossLiquid", "True");
            else
                rk.SetValue("EnablePerLossLiquid", "False");

            if (m_EnablePerProfitLiquid == true)
                rk.SetValue("EnablePerProfitLiquid", "True");
            else
                rk.SetValue("EnablePerProfitLiquid", "False");

            if (m_EnableTotalLossLiquid == true)
                rk.SetValue("EnableTotalLossLiquid", "True");
            else
                rk.SetValue("EnableTotalLossLiquid", "False");

            if (m_EnableTotalProfitLiquid == true)
                rk.SetValue("EnableTotalProfitLiquid", "True");
            else
                rk.SetValue("EnableTotalProfitLiquid", "False");

            if (m_EnableTotalProfitStepLiquid == true)
                rk.SetValue("EnableTotalProfitStepLiquid ", "True");
            else
                rk.SetValue("EnableTotalProfitStepLiquid ", "False");

            if (m_EnableProfitTrailStop == true)
                rk.SetValue("EnableProfitTrailStop", "True");
            else
                rk.SetValue("EnableProfitTrailStop ", "False");

            rk.SetValue("OrderTarget", m_OrderTarget.ToString());
            rk.SetValue("FirstMaxOrderAmount", m_FirstMaxOrderAmount.ToString());
        }


        private void cbEnableProfitStepLiquid_CheckedChanged(object sender, EventArgs e)
        {
            bool enableTotalProfitStepLiquid = false;
            if (cbEnableProfitStepLiquid.Checked == true)
            {
                enableTotalProfitStepLiquid = true;
            }
            else
            {
                enableTotalProfitStepLiquid = false;
            }

            m_EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.EnableTotalProfitStepLiquid = enableTotalProfitStepLiquid;
            }
        }

        private void comboStepLiquid_SelectedIndexChanged(object sender, EventArgs e)
        {
            string selText = comboStepLiquid.SelectedItem.ToString();
            if (selText == "")
                return;
            double stepLiquidVal = Convert.ToDouble(selText);

            m_StepLiquidVal = stepLiquidVal;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.StepLiquidVal = stepLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.StepLiquidVal = stepLiquidVal;
            }
        }

        private void cbEnableMaxProfitLiquid_CheckedChanged(object sender, EventArgs e)
        {
            bool enableProfitTrailStop = false;
            if (cbEnableMaxProfitLiquid.Checked == true)
            {
                enableProfitTrailStop = true;
            }
            else
            {
                enableProfitTrailStop = false;
            }

            m_EnableProfitTrailStop = enableProfitTrailStop;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.EnableProfitTrailStop = enableProfitTrailStop;
            }
        }

        private void comboMaxProfitDelta_SelectedIndexChanged(object sender, EventArgs e)
        {
            string selText = comboMaxProfitDelta.SelectedItem.ToString();
            if (selText == "")
                return;
            double maxProfitLiquidVal = Convert.ToDouble(selText);

            m_MaxProfitLiquidVal = maxProfitLiquidVal;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.MaxProfitLiquidVal = maxProfitLiquidVal;
            }
        }

        private void comboMinProfit_SelectedIndexChanged(object sender, EventArgs e)
        {
            string selText = comboMinProfit.SelectedItem.ToString();
            if (selText == "")
                return;
            double minProfit = Convert.ToDouble(selText);

            m_MinProfit = minProfit;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.MinProfit = minProfit;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.MinProfit = minProfit;
            }
        }

        private void tbPerLiquidAmount_TextChanged(object sender, EventArgs e)
        {
            string selText = tbPerLiquidAmount.Text;
            if (selText == "")
                return;
            int perLiquidOrderAmount = Convert.ToInt32(selText);

            m_PerLiquidOrderAmount = perLiquidOrderAmount;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.PerLiquidOrderAmount = perLiquidOrderAmount;
            }
        }

        private void rbFutureOrder_CheckedChanged(object sender, EventArgs e)
        {
            int OrderTarget = GlobalVar.OrderTargetFuture;

            m_OrderTarget = OrderTarget;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.OrderTarget = OrderTarget;
            }
        }

        private void rbOptionOrder_CheckedChanged(object sender, EventArgs e)
        {
            int OrderTarget = GlobalVar.OrderTargetOption;
            m_OrderTarget = OrderTarget;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.OrderTarget = OrderTarget;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.OrderTarget = OrderTarget;
            }
        }

        private void tbFirstMaxOrderAmount_TextChanged(object sender, EventArgs e)
        {
            string selText = tbFirstMaxOrderAmount.Text;
            if (selText == "")
                return;
            int FirstMaxOrderAmount = Convert.ToInt32(selText);
            m_FirstMaxOrderAmount = FirstMaxOrderAmount;

            if (m_SysType == GlobalVar.SysTypeJisuWaveHogaSummit)
            {
                JisuWaveHogaSummitSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeJisuWave)
            {
                JisuWaveSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaWave)
            {
                HogaWaveSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSquareOcc)
            {
                HogaSquareOccSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeHogaSummit)
            {
                HogaSummitSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutSquareOcc)
            {
                CallPutSquareOccSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypePureHogaSummit)
            {
                PureHogaSummitSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeLooseHogaSummit)
            {
                LooseHogaSummitSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeCallPutInvDiv)
            {
                CallPutInvDivSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeTipAttack)
            {
                TipAttackSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptPrice)
            {
                OptPriceSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptMainPrice)
            {
                OptMainPriceSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptCenterPrice)
            {
                OptCenterPriceSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBothSell)
            {
                OptBothSellSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeOptBend)
            {
                OptBendSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
            else if (m_SysType == GlobalVar.SysTypeSubject)
            {
                SubjectSysVar.FirstMaxOrderAmount = FirstMaxOrderAmount;
            }
        }

    }
}
